package com.google.code.jcooky.rpc.compiler.executor;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;

import com.google.code.jcooky.rpc.compiler.Compiler;
import com.google.code.jcooky.rpc.compiler.java.JavaCompiler;

public class ComplierExecutor {
	public static void main(String []args) throws IOException {
		// argument
		// $./java CompilerExecutor -gen-java -gen-cpp -odestFolder src.jrc
		
		Argument arg = new Argument(args);
		
		if(arg.isGenJava()) {
			Compiler compiler = new JavaCompiler(new File(arg.getDest()));
			compiler.compile(new FileReader(arg.getSrc()));
		} else if(arg.isGenCpp()) {
			//
		}
	}
}
